import axios from 'axios'
import qs from 'qs'
export const POST = (url, params) => {
	var instance = axios.create({
		headers: {
			'Content-Type': 'application/x-www-form-urlencoded'
		},
		transformRequest: [function (data) {
		// 对 data 进行任意转换处理
			return qs.stringify({
				...data
			}) 
		}],
		timeout: 5000
	})
	return instance.post(process.env.API_HOST + url, params).then(res => res.data);
}